package com.feit.client.feign;

import com.feit.client.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author zhaiding
 * @date 2019/3/14 15:43
 */
@FeignClient(name = "springcloud-client")
public interface UserServiceClient {

    @RequestMapping(value = "/queryAll")
    List<User> queryAll();

    @RequestMapping(value = "/queryById")
    User queryById(@RequestParam Integer id);

    @RequestMapping(value = "/deleteById")
    String deleteById(@RequestParam Integer id);


    @RequestMapping(value = "/save")
    String save(@RequestBody User user);

    @RequestMapping(value = "/updateById")
    String updateById(@RequestBody User user);

}
